import Link from 'next/link'

type T = {
  title: string
  desc?: string
  entries: { label: string; link: string }[]
}
export default function Entries(props: T) {
  const { title, desc, entries } = props
  return (
    <div className="flex flex-col gap-10 py-row max-sm:py-sRow">
      <div className="flex flex-col gap-3">
        <h2 className="leading-tight text-secondTitle font-bold text-black text-center">
          {title}
        </h2>
        {desc && (
          <div className="text-desc text-menuTxt text-center">{desc}</div>
        )}
      </div>
      <div className="grid grid-cols-3 gap-3 max-sm:grid-cols-1">
        {entries?.map((item) => (
          <Link href={item.link} key={item.label}>
            <div className="w-[285px] h-[50px] flex items-center justify-center rounded-lg border text-[18px] text-menuTxt cursor-pointer bg-white hover:border-[#BB27F7] hover:bg-[#E9F7FF] hover:text-[#BB27F7] max-sm:w-full">
              {item.label}
            </div>
          </Link>
        ))}
      </div>
    </div>
  )
}
